﻿<%@ Page Language="C#" MasterPageFile="~/Design/MasterPage/MasterPage.master" AutoEventWireup="true" CodeFile="RoomInfoMaintanceForm.aspx.cs" Inherits="App_Master_RoomInfo" Title="房间信息维护" %>

<%@ Register Assembly="ShpmCommon" Namespace="Shpm.System.Web.Control" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:Panel ID="PanelNavigate" runat="server" />
    <script language="javascript">
    var strArray = new Array(<%=cmbRoomLst %>);
    function settext(id,val){
     //alert(id + '***' + val);
     window.document.getElementById(id).value=val;
    }
    function delmessage(){
        return window.confirm("是否要该房间信息？");
    }
    function changediv(str){
        window.document.getElementById("ctl00_ContentPlaceHolder1_roomA").style.display="";
        for(var i=0;i<strArray.length;i++){
            if(str==strArray[i]){
            window.document.getElementById("ctl00_ContentPlaceHolder1_roomA").style.display="none";
            break;}
        }
        //if (str=="A" || str=="B" || str=="C") 
        window.document.getElementById('<%=iRoom.ClientID %>').src="../../Design/Room_"+ str +".htm";
    }
    function popup(){
        window.open('../Commons/RoomSearchForm.aspx?tID=<%=txtRoomIDSel.ClientID%>','RoomSearchForm','scrollbars,resizable')
    }
    </script>
<div>
               <cc1:comvalidator id="ComValidator1" runat="server" forecolor="Red" CheckItems-Capacity="4">
                   <cc1:CheckRequiredAttribute Code="E0082" ControlToValidator="txtRoomIDSel">
                       <cc1:ComAbsParamsAttribute Parameter="房间编号" />
                   </cc1:CheckRequiredAttribute>
                   <cc1:CheckHalfAttribute Code="E0317" ControlToValidator="txtRoomIDSel">
                       <cc1:ComAbsParamsAttribute Parameter="房间编号" />
                   </cc1:CheckHalfAttribute>
                   <cc1:CheckMaxCharLenAttribute CharLen="6" ControlToValidator="txtRoomIDSel">
                       <cc1:ComAbsParamsAttribute Parameter="房间编号" />
                       <cc1:ComAbsParamsAttribute Parameter="6" />
                   </cc1:CheckMaxCharLenAttribute>
               </cc1:comvalidator>
               <cc1:ComValidator ID="ComValidator2" runat="server" CheckItems-Capacity="32" ForeColor="Red">
                   <cc1:CheckRequiredAttribute Code="E0082" ControlToValidator="txtApartmentNo">
                       <cc1:ComAbsParamsAttribute Parameter="房间编号" />
                   </cc1:CheckRequiredAttribute>
                   <cc1:CheckHalfAttribute Code="E0317" ControlToValidator="txtApartmentNo">
                       <cc1:ComAbsParamsAttribute Parameter="房间编号" />
                   </cc1:CheckHalfAttribute>
                   <cc1:CheckMaxCharLenAttribute CharLen="6" Code="E0081" ControlToValidator="txtApartmentNo">
                       <cc1:ComAbsParamsAttribute Parameter="房间编号" />
                       <cc1:ComAbsParamsAttribute Parameter="6" />
                   </cc1:CheckMaxCharLenAttribute>
                   <cc1:CheckRequiredAttribute Code="E0082" ControlToValidator="txtBuildingNo">
                       <cc1:ComAbsParamsAttribute Parameter="楼号" />
                   </cc1:CheckRequiredAttribute>
                   <cc1:CheckHalfAttribute Code="E0317" ControlToValidator="txtBuildingNo">
                       <cc1:ComAbsParamsAttribute Parameter="楼号" />
                   </cc1:CheckHalfAttribute>
                   <cc1:CheckMaxCharLenAttribute CharLen="2" Code="E0081" ControlToValidator="txtBuildingNo">
                       <cc1:ComAbsParamsAttribute Parameter="楼号" />
                       <cc1:ComAbsParamsAttribute Parameter="2" />
                   </cc1:CheckMaxCharLenAttribute>
                   <cc1:CheckRequiredAttribute Code="E0082" ControlToValidator="txtRoomNo">
                       <cc1:ComAbsParamsAttribute Parameter="房间号" />
                   </cc1:CheckRequiredAttribute>
                   <cc1:CheckHalfAttribute Code="E0317" ControlToValidator="txtRoomNo">
                       <cc1:ComAbsParamsAttribute Parameter="房间号" />
                   </cc1:CheckHalfAttribute>
                   <cc1:CheckMaxCharLenAttribute CharLen="2" Code="E0081" ControlToValidator="txtRoomNo">
                       <cc1:ComAbsParamsAttribute Parameter="房间号" />
                       <cc1:ComAbsParamsAttribute Parameter="2" />
                   </cc1:CheckMaxCharLenAttribute>
                   <cc1:CheckMaxCharLenAttribute CharLen="32" Code="E0081" ControlToValidator="txtRoomName">
                       <cc1:ComAbsParamsAttribute Parameter="房间名称" />
                       <cc1:ComAbsParamsAttribute Parameter="32" />
                   </cc1:CheckMaxCharLenAttribute>
                   <cc1:CheckMaxCharLenAttribute CharLen="250" Code="E0081" ControlToValidator="txtRoomNote">
                       <cc1:ComAbsParamsAttribute Parameter="房间描述" />
                       <cc1:ComAbsParamsAttribute Parameter="250" />
                   </cc1:CheckMaxCharLenAttribute>
                   <cc1:CheckMaxCharLenAttribute CharLen="128" Code="E0081" ControlToValidator="txtRoomPosition">
                       <cc1:ComAbsParamsAttribute Parameter="地理位置" />
                       <cc1:ComAbsParamsAttribute Parameter="128" />
                   </cc1:CheckMaxCharLenAttribute>
                   <cc1:CheckRequiredAttribute Code="E0082" ControlToValidator="txtFloor">
                       <cc1:ComAbsParamsAttribute Parameter="楼层" />
                   </cc1:CheckRequiredAttribute>
                   <cc1:CheckHalfAttribute Code="E0317" ControlToValidator="txtFloor">
                       <cc1:ComAbsParamsAttribute Parameter="楼层" />
                   </cc1:CheckHalfAttribute>
                   <cc1:CheckMaxCharLenAttribute CharLen="2" Code="E0081" ControlToValidator="txtFloor">
                       <cc1:ComAbsParamsAttribute Parameter="楼层" />
                       <cc1:ComAbsParamsAttribute Parameter="2" />
                   </cc1:CheckMaxCharLenAttribute>
                   <cc1:CheckLongRangeAttribute Code="E0065" ControlToValidator="txtCapacity" MaxNumber="2"
                       MinNumber="1">
                       <cc1:ComAbsParamsAttribute Parameter="最大入住限制" />
                       <cc1:ComAbsParamsAttribute Parameter="1" />
                       <cc1:ComAbsParamsAttribute Parameter="2" />
                   </cc1:CheckLongRangeAttribute>
               </cc1:ComValidator>
               <cc1:ComValidator ID="ComValidator3" runat="server" CheckItems-Capacity="4" ForeColor="Red">
                   <cc1:CheckRequiredAttribute Code="E0082" ControlToValidator="txtApartmentNo">
                       <cc1:ComAbsParamsAttribute Parameter="房间编号" />
                   </cc1:CheckRequiredAttribute>
                   <cc1:CheckHalfAttribute Code="E0317" ControlToValidator="txtApartmentNo">
                       <cc1:ComAbsParamsAttribute Parameter="房间编号" />
                   </cc1:CheckHalfAttribute>
                   <cc1:CheckMaxCharLenAttribute CharLen="6" Code="E0081" ControlToValidator="txtApartmentNo">
                       <cc1:ComAbsParamsAttribute Parameter="房间编号" />
                       <cc1:ComAbsParamsAttribute Parameter="6" />
                   </cc1:CheckMaxCharLenAttribute>
               </cc1:ComValidator>

<table width="80%" >
  <tr>
    <td style="height: 120px">
        <table class="table_border_line">
            <tr>
			<td align="left" colspan="4" >
			    <script language="javascript">
                                        (new TitleBar('SearchBar', '检索条件')).showBar();
                            </script>
			</td>						
		  </tr>				
        </table>
		<table class="table_border_line"  style="background:ffffff">
		  <tr>
			<td style="width:90px">&nbsp;</td>
			<td style="width:120px; white-space:nowrap" align="left">房间编号</td>
			<td align="left">
				<table>
					<tr>
						<td style="width: 3px; height: 58px;">
                            <asp:TextBox ID="txtRoomIDSel" runat="server" MaxLength="6"></asp:TextBox></td>
						<td style="height: 58px">
				            <table>
					            <tr>
                                    <td >
                                        <a href="#" onclick="javascript:popup();"><img src="../../images/search.jpg" border="0" /></a></td>						
					            </tr>
				            </table>						
						</td>						
					</tr>
				</table>			
			</td>
		  </tr>				  
    </table>	
	</td>
	<td style="height: 120px">&nbsp;</td>
  </tr>
  <tr>
    <td align="center" style="height: 21px">
      <table>
         <tr>
            <td style="width:80px; height: 24px;" >
                <asp:Button ID="btnSerch" runat="server" CssClass="button1" Text="检 索"  Height="100%" Width="100%" OnClick="btnSerch_Click"/></td>						
         </tr>
      </table>   
    </td>
  </tr>
</table>
<br/> 
<table width="80%">
  <tr>
    <td>
        <table class="table_border_line" width="80%">
            <tr>
			<td align="left" colspan="6" >
			    <script language="javascript">
                                        (new TitleBar('SearchBar1', '房间信息')).showBar();
                            </script>
			</td>						
		  </tr>				
        </table>
		<table class="table_border_line" width="80%"  style="background:ffffff">
		  <tr>
			<td style="width:90px; height: 26px;">&nbsp;</td>
			<td style="width:120px; white-space:nowrap; height: 26px;" align="left">房间编号</td>
			<td style="width:90px; height: 26px;" align="left">
                <asp:TextBox ID="txtApartmentNo" runat="server" Width="120px" MaxLength="6"></asp:TextBox><span class="red0">*</span></td>
			<td colspan="3" align="right" style="height: 26px">&nbsp;</td>						
		  </tr>		  
		  <tr>
			<td style="width:90px">&nbsp;</td>
			<td style="width:120px; white-space:nowrap" align="left">楼号</td>
			<td style="width:90px" align="left">
                <asp:TextBox ID="txtBuildingNo" runat="server" Width="120px" MaxLength="2"></asp:TextBox><span class="red0">*</span></td>
			<td colspan="3" align="right">&nbsp;</td>						
		  </tr>		  		  
		  <tr>
			<td style="width:90px">&nbsp;</td>
			<td style="width:120px; white-space:nowrap" align="left">房号</td>
			<td style="width:90px" align="left">
                <asp:TextBox ID="txtRoomNo" runat="server" Width="120px" MaxLength="2"></asp:TextBox><span class="red0">*</span></td>
			<td colspan="3" align="right">&nbsp;</td>						
		  </tr>	
		  <tr>
			<td style="height: 26px" >&nbsp;</td>
			<td align="left" style="white-space:nowrap; height: 26px;">所属楼层</td>
			<td colspan="2" align="left" style="height: 26px; width: 455px;">第
                <asp:TextBox ID="txtFloor" runat="server" Width="120px" MaxLength="2"></asp:TextBox>层<span class="red0">*</span>
			</td>
			<td colspan="2" align="right" style="height: 26px">&nbsp;</td>						
		  </tr>	  
		  <tr>
			<td >&nbsp;</td>
			<td align="left" style="white-space:nowrap;" >房间名称</td>
			<td colspan="2"align="left" style="width: 455px">
                <asp:TextBox ID="txtRoomName" runat="server" Width="80%" MaxLength="32"></asp:TextBox></td>
			<td colspan="2" align="right">&nbsp;</td>						
		  </tr>		
		  <tr>
			<td >&nbsp;</td>
			<td align="left" style="white-space:nowrap;" >标准配置</td>
			<td colspan="2"align="left" style="width: 455px">
                <asp:DropDownList ID="ddlScheme" DataTextField="SchemeName" DataValueField="SchemeId" AutoPostBack="true" runat="server" OnSelectedIndexChanged="ddlScheme_SelectedIndexChanged" />
                <span class="red0">*</span>
            </td>
			<td colspan="2" align="right">&nbsp;</td>						
		  </tr>
		  <tr>
			<td >&nbsp;</td>
			<td style="white-space:nowrap;">房间描述</td>
			<td align="left" colspan="2" style="width: 455px">
                <asp:TextBox ID="txtRoomNote" runat="server" Width="80%" MaxLength="250"></asp:TextBox></td>
			<td colspan="2" align="right">&nbsp;</td>						
		  </tr>			  	
		  <tr>
			<td >&nbsp;</td>
			<td style="white-space:nowrap;">地理位置</td>
			<td align="left" colspan="2" style="width: 455px">
                <asp:TextBox ID="txtRoomPosition" runat="server" Width="80%" MaxLength="128"></asp:TextBox></td>
			<td colspan="2" align="right">&nbsp;</td>						
		  </tr>		
		  		  <tr>
			<td >&nbsp;</td>
			<td style="white-space:nowrap;">最大入住限制</td>
			<td align="left" colspan="2" style="width: 455px">
                <asp:TextBox ID="txtCapacity" runat="server" Width="120px" MaxLength="1"></asp:TextBox></td>
			<td colspan="2" align="right">&nbsp;</td>						
		  </tr>	
		  <tr>
			<td >&nbsp;</td>
			<td align="left" valign="middle " style="vertical-align: bottom; padding-bottom: 5px;">状态</td>
			<td align="left" colspan="2" style="vertical-align: middle; width: 455px;">
                &nbsp;
                <asp:RadioButtonList ID="rblRoom" runat="server" 
                    RepeatDirection="Horizontal" Width="80%" Height="1px">
                    <asp:ListItem Value="1" Selected="True">净房</asp:ListItem>
                    <asp:ListItem Value="2">清扫房  </asp:ListItem>
                    <asp:ListItem Value="3">脏房 </asp:ListItem>
                    <asp:ListItem Value="4">维修房</asp:ListItem>
                </asp:RadioButtonList></td>
			<td colspan="2" align="right">&nbsp;</td>						
		  </tr>				  
		  <tr>
			<td >&nbsp;</td>
			<td align="left" valign="top" style="white-space:nowrap;" rowspan="2">房型</td>
			<td colspan="2" align="left" style="width: 455px">
                &nbsp;<asp:DropDownList ID="cmbRoom" runat="server" onchange="javascript:changediv(this.value);" DataTextField="Content" DataValueField="DictNo">
                </asp:DropDownList></td>
			<td colspan="2" align="right">&nbsp;</td>						
		  </tr>			      		    		        	  
		  <tr>
			<td >&nbsp;</td>
			<td colspan="2" align="left" style="width: 600px">
                <div id="roomA" runat="server" style="display:none">
                    <iframe   id="iRoom" runat="server" frameborder="0" scrolling="auto"  height="320px" width="600px" src="../../Design/Room_A.htm"  >
                    </iframe>
                </div>
                </td>
			<td colspan="2" align="right">&nbsp;</td>						
		  </tr>
		  <tr>
			<td >&nbsp;</td>
			<td align="left" valign="top" style="white-space:nowrap;" rowspan="2"><br /></td>
			<td colspan="2" align="center" style="width: 455px">
			    <span style="width:300px">
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
                        CssClass="GridView_table"
                        EnableViewState="False"
                    >
                         <Columns>
                            <asp:BoundField DataField="ItemName" HeaderText="配置名称">
                                <ItemStyle CssClass="GridView_item_left" />
                                <HeaderStyle CssClass="GridView_head_grayblue" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Quantity" HeaderText="配置数量">
                                <ItemStyle CssClass="GridView_item_center" Width="80" />
                                <HeaderStyle CssClass="GridView_head_grayblue" />
                            </asp:BoundField>
                         </Columns>
                    </asp:GridView>
                </span>
            </td>
			<td colspan="2" align="right">&nbsp;</td>						
		  </tr>
    </table>	    
	</td>
  </tr>
  <tr>
    <td align="center">
        <table width="360">
          <tr>
            <td>
                <asp:Button ID="btnAdd" runat="server" Text="登 录" CssClass="button" Width="100%" OnClick="btnAdd_Click" /></td>
            <td>
                <asp:Button ID="btnDel" runat="server" CssClass="button" Text="删 除" Width="100%" OnClientClick="return delmessage();" OnClick="btnDel_Click" /></td>
            <td>
                <asp:Button ID="btnCancel" runat="server" CssClass="button" Text="取 消" Width="100%" OnClick="btnCancel_Click" /></td>
            <td>
                <asp:Button ID="btnExit" runat="server" CssClass="button" Text="返 回" Width="100%" /></td>	        
          </tr>   
        </table> 
	</td>
  </tr>     
</table>  
    </div>
</asp:Content>

